import { RouterRecord } from "@/global/record/RouterRecord";

// 获取路由
export function getRoutersApi(): Promise<ApiDataRecord<RouterRecord[]>> {
  // return request({
  //   url: '/getRoutersBySys',
  //   method: 'get'
  // })
  return Promise.resolve({
    "code": 200,
    "data": [
      {
        "name": "System",
        "path": "/system",
        "hidden": false,
        "redirect": "noRedirect",
        "component": "Layout",
        "alwaysShow": true,
        "meta": {
          "title": "系统管理",
          "icon": "Setting",
          "noCache": false,
          "link": null
        },
        "children": [
          {
            "name": "User",
            "path": "user",
            "hidden": false,
            "component": "system/user/index",
            "meta": {
              "title": "用户管理",
              "icon": "User",
              "noCache": false,
              "link": null
            }
          },
          {
            "name": "Iconview",
            "path": "iconview",
            "hidden": false,
            "component": "system/iconview/index",
            "meta": {
              "title": "icon图标",
              "icon": "Picture",
              "noCache": false,
              "link": null
            }
          }
        ]
      },
      {
        "name": "Tool",
        "path": "/tool",
        "hidden": false,
        "redirect": "noRedirect",
        "component": "Layout",
        "alwaysShow": true,
        "meta": {
          "title": "系统工具",
          "icon": "SetUp",
          "noCache": false,
          "link": null
        },
        "children": [
          {
            "name": "Generate",
            "path": "generate",
            "hidden": false,
            "component": "tool/generate/index",
            "meta": {
              "title": "前端代码生成",
              "icon": "DocumentCopy",
              "noCache": false,
              "link": null
            }
          },
          {
            "name": "Generate/Preview",
            "path": "generate/preview",
            "hidden": true,
            "component": "tool/generate/preview",
            "meta": {
              "title": "前端代码生成详情",
              "icon": "DocumentCopy",
              "noCache": false,
              "link": null
            }
          }
        ]
      }
    ],
    "msg": ""
  })
}